package com.example.authority.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.example.authority.entity.User ;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @program:   
 * @ClassName:Incode
 * @description: 邀请码管理 实体类
 *       
 * @Version 3.0
 **/

@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_incode")
@Schema(title = "Incode对象", description = "邀请码管理")
public class Incode implements Serializable {

    private static final long serialVersionUID = 1L;
    
    @Schema(title = "序列号")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("序列号")
    private Long id;
    
    @Schema(title = "用户名")
    @TableField("userid")
    @ExcelProperty("用户名")
    private Long userid;
    
    @Schema(title = "邀请码")
    @TableField("invateCode")
    @ExcelProperty("邀请码")
    private String invateCode;
    
    @Schema(title = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;
    
    @Schema(title = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "updateTime", fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty("更新时间")
    private LocalDateTime updateTime;
    
    @TableField(exist = false)
    @ExcelIgnore
    private User user = new User();
}
